Skip to main content

executeCommand

Executes the command which will be used to create the document file (text document, spreadsheet, presentation, form document, PDF). See the Text document API, Spreadsheet API, Presentation API, or Form API sections for more information which commands are available for various document types.

Please note, that for the .docbuilder file the CDocBuilder.executeCommand method is not used explicitly. The command itself is used instead. See the example below.

Syntax

boolean executeCommand(String command, CDocBuilderValue retValue = 0);

Parameters

ParameterTypeDefaultDescription
commandStringThe command in the form of JavaScript code which will be used to create the document file (in Java, the escape character must be used when the command contains quotation symbols).
retValueCDocBuilderValue0The command return value.

Example

Java

CDocBuilder.initialize("");
CDocBuilder builder = new CDocBuilder();
builder.executeCommand(L"oParagraph.AddText(\"Hello from Java!\");");
CDocBuilder.dispose();

.docbuilder

oParagraph.AddText("Hello from Java!")